package main

import "fmt"

/**
返回两个中得最大值
*/
func max(a int, b int) int {
	if a >= b {
		return a
	} else {
		return b
	}
}

/**
字符串交换
*/
func swap(s1 string, s2 string) (string, string) {
	return s2, s1
}

/**
引用传递
*/
func swap_int(x *int, y *int) {
	var t int
	t = *x
	*x = *y
	*y = t
}

func main() {
	fmt.Println(max(1, 2))
	fmt.Println(swap("a", "b"))
	var a, b = 3, 4
	swap_int(&a, &b)
	fmt.Println(a, b)
}
